import request from "@/utils/request.ts";
import type { ConsultOrderListParams } from "@/types/consultRecordTypes";
import type { ConsultOrderPage } from "@/types/consultRecordTypes";
import type { ResponseType } from "@/types/responseTypes";

enum Enum {
    fetchConsultOrderList = "/patient/consult/order/list",
    cancelConsultOrder="/patient/order/cancel",
    deleteOrder="/patient/order"
}

/*获取问诊订单数据的接口*/
export const fetchConsultOrderListAPI = (params: ConsultOrderListParams) => request.get<ConsultOrderPage, ResponseType<ConsultOrderPage>>(Enum.fetchConsultOrderList,{params});
/*取消问诊订单的接口*/
export const cancelConsultOrderAPI=(id:string)=>request.put(`${Enum.cancelConsultOrder}/${id}`)
/*删除订单的接口*/
export const deleteOrderAPI = (id: string) => request.delete(`${Enum.deleteOrder}/${id}`);
